# !/usr/bin/env python
# -*- encoding: utf-8 -*-
# @Author : 大野


# 登录
def login_username(data):
    list = []
    sql = 'select username from test_platform where username = "{username}"'.format(**data)
    list.append(sql)
    return list


def login_password(data):
    list = []
    sql = 'select password from test_platform where `password` = "{password}"'.format(**data)
    list.append(sql)
    return list

def login(data):
    list=[]
    sql = f"""select * from platform_login where username="{data['username']}" and `password`="{data['password']}";"""
    list.append(sql)
    return list
# 注册
def regist(data):
    list = []
    sql = f"INSERT INTO `platform_login`(`username`, `password`, `email`, `created`) VALUES ('{data['username']}', '{data['password']}', '{data['email']}', NOW());"
    list.append(sql)
    return list